# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=one-lin3r
pkgver=65.168bb6d
pkgrel=4
pkgdesc='Gives you one-liners that aids in penetration testing and more.'
arch=('any')
groups=('blackarch' 'blackarch-misc')
url='https://github.com/D4Vinci/One-Lin3r'
license=('GPL')
depends=('python' 'python-argparse' 'python-terminaltables'
         'python-pyperclip' 'python-prompt_toolkit')
makedepends=('git' 'python-setuptools')
source=("$pkgname::git+https://github.com/D4Vinci/One-Lin3r.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  python setup.py build
}

package() {
  cd $pkgname

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
  install -Dm 644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

